﻿@page
@model Blogifier.Pages.Account.LoginModel
@{
    ViewData["Title"] = "Edit";
    Layout = "~/Pages/Account/_Layout.cshtml";
}
<div class="form-login">
    @if (!User.Identity.IsAuthenticated)
    {
    <form asp-route-returnurl="@HttpContext.Request.Query["ReturnUrl"]" class="form" method="POST">
        <div class="bf-account-header">
            <h1>Welcome!</h1>
            <p>You can sign in or go <a href="~/">back to blog</a>.</p>
        </div>
        <div asp-validation-summary="All" class="text-danger"></div>
        <input asp-for="UserName" class="form-control form-control form-control-top" placeholder="Username" autofocus>
        <input asp-for="Password" class="form-control form-control form-control-bottom" placeholder="Password">
        <div class="my-3">
            <label class="custom-control custom-checkbox my-auto pr-0 mr-2">
                <input type="checkbox" asp-for="RememberMe" class="custom-control-input">
                <span class="custom-control-label">Remember me</span>
            </label>
        </div>
        <button type="submit" class="btn btn-lg btn-primary btn-block">Sign in</button>
    </form>
    }
    else
    {
        <div class="bf-account-header mb-0">
            <div class="h5 mb-4">You are already signed in!</div>
            <div class="btn-group d-flex">
                <a href="~/" class="btn btn-outline-primary w-100">Blog</a>
                <a href="~/admin" class="btn btn-outline-primary w-100">Admin</a>
            </div>
        </div>
    }
</div>
